-location ~ \.php$ {
- include /etc/nginx/conf.d/fastcgi.conf;
- fastcgi_index index.php ;
- fastcgi_param REDIRECT_STATUS 200;
+location /images/deleted {
+ # Deny access to deleted images folder
+ deny all;
+}
+
+# Deny access to folders MediaWiki has a .htaccess deny in
+location /cache { deny all; }
+location /languages { deny all; }
+location /maintenance { deny all; }
+location /serialized { deny all; }
+
+# Just in case, hide .svn and .git too
+location ~ /.(svn|git)(/|$) { deny all; }
+
+# Hide any .htaccess files
+location ~ /.ht { deny all; }
+
+# Uncomment the following code if you wish to hide the installer/updater
+## Deny access to the installer
+#location /mw-config { deny all; }
+
+# Handling for the article path
+location /wiki {
+ include /etc/nginx/fastcgi_params;
+ # article path should always be passed to index.php
+ fastcgi_param SCRIPT_FILENAME $document_root/index.php;